package com.hx.guava;

import com.google.common.collect.ArrayListMultimap;

import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * @author MinghuaChen
 * @since 2023/1/10 下午11:16
 */
public class ListMapTest {
    public static void main(String[] args) {
        ArrayListMultimap<String, String> multimap = ArrayListMultimap.create();
        multimap.put("a","b");
        multimap.put("a","c");
        multimap.put("a","d");
        multimap.put("a","e");

        Map<String, Collection<String>> stringCollectionMap = multimap.asMap();

        System.out.println(stringCollectionMap.size());

        Collection<String> collection = stringCollectionMap.get("a");
        collection.forEach(System.out::println);


    }
}
